package cn.cycleif.entity;

import cn.cycleif.enums.ObjectTypeEnum;
import cn.cycleif.enums.VoteStatusEnum;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @Date: 25/2/13-12:56
 * @Desc:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Vote {

  @TableId(type = IdType.AUTO)
  private Integer        id;
  private Integer        userId;
  private Integer        triggerUserId;
  private Integer        objectId;
  private ObjectTypeEnum objectType;
  private VoteStatusEnum status;

  @TableField(fill = FieldFill.INSERT)
  private LocalDateTime createAt;
  @TableField(fill = FieldFill.UPDATE)
  private LocalDateTime updateAt;
}
